package com.yunwaikeji.gy_tool_library.utils.picture.selector;

import android.app.Activity;
import android.content.Intent;

public class GYPictureSelectorManager {
    private Activity activity;
    private GYPictureSelectorListener pictureSelectorListener;
    private int requestCode = GYPictureSelectorInfo.REQUEST_CODE_OK;

    public GYPictureSelectorManager(Activity activity) {
        this.activity = activity;
    }

    public GYPictureSelectorManager setPictureSelectorListener(GYPictureSelectorListener pictureSelectorListener) {
        this.pictureSelectorListener = pictureSelectorListener;
        return this;
    }

    public GYPictureSelectorManager setRequestCode(int requestCode) {
        this.requestCode = requestCode;
        return this;
    }

    public void open() {
        Intent intent = new Intent(activity, GYPictureSelectorActivity.class);
        activity.startActivityForResult(intent, requestCode);
    }
}
